aggregate element
Extending Answer Set Programming with Rational Numbers
Pacenza, Francesco, Zangari, Jessica
Answer Set Programming (ASP) is a widely used declarative programming paradigm that has shown great potential in solving complex computational problems. However, the inability to natively support non-integer arithmetic has been highlighted as a major drawback in real-world applications. This feature is crucial to accurately model and manage real-world data and information as emerged in various contexts, such as the smooth movement of video game characters, the 3D movement of mechanical arms, and data streamed by sensors. Nevertheless, extending ASP in this direction, without affecting its declarative nature and its well-defined semantics, poses non-trivial challenges; thus, no ASP system is able to reason natively with non-integer domains. Indeed, the widespread floating-point arithmetic is not applicable to the ASP case, as the reproducibility of results cannot be guaranteed and the semantics of an ASP program would not be uniquely and declaratively determined, regardless of the employed machine or solver. To overcome such limitations and in the realm of pure ASP, this paper proposes an extension of ASP in which non-integers are approximated to rational numbers, fully granting reproducibility and declarativity. We provide a well-defined semantics for the ASP-Core-2 standard extended with rational numbers and an implementation thereof. We hope this work could serve as a stepping stone towards a more expressive and versatile ASP language that can handle a broader range of real-world problems.
On the Foundations of Grounding in Answer Set Programming
Kaminski, Roland, Schaub, Torsten
We provide a comprehensive elaboration of the theoretical foundations of variable instantiation, or grounding, in Answer Set Programming (ASP). Building on the semantics of ASP's modeling language, we introduce a formal characterization of grounding algorithms in terms of (fixed point) operators. A major role is played by dedicated well-founded operators whose associated models provide semantic guidance for delineating the result of grounding along with on-the-fly simplifications. We address an expressive class of logic programs that incorporates recursive aggregates and thus amounts to the scope of existing ASP modeling languages. This is accompanied with a plain algorithmic framework detailing the grounding of recursive aggregates. The given algorithms correspond essentially to the ones used in the ASP grounder gringo.
ASP-Core-2 Input Language Format
Calimeri, Francesco, Faber, Wolfgang, Gebser, Martin, Ianni, Giovambattista, Kaminski, Roland, Krennwallner, Thomas, Leone, Nicola, Maratea, Marco, Ricca, Francesco, Schaub, Torsten
Standardization of solver input languages has been a main dr iver for the growth of several areas within knowledge representation and reasoning, fostering the exploitation in actual applications. In this document we present the ASP-Core-2 standard input language for Answer Set Programming, which h as been adopted in ASP Competition events since 2013. KEYWORDS: Answer Set Programming, Standard Language, Knowledge Rep resentation and Reasoning, Standardization 2 Calimeri et al. 1 Introduction The process of standardizing the input languages of solvers for knowledge representation and reasoning research areas has been of utmost importance for the growth o f the related research communities: this has been the case for, e.g., the CNF-DIMACS format for SA T, th en extended to describe input formats for Max-SA T and QBF problems, the OPB format for pseudo-Boolean problems, somehow at the intersection between the CNF-DIMACS format and the LP format for Integer L inear Programming, the XCSP3 format for CP solving, SMT -LIB format for SMT solving, and the STRIP S/ PDDL language for automatic planning. The availability of such common input languages have l ed to the development of e ffi cient solvers in di ff erent KR communities, through a series of solver competitio ns that have pushed the adoption of these standards. The availability of e ffi cient solvers, together with a presence of a common interfac e language, has helped the exploitation of these methodologies in appli cations. The same has happened for Answer Set Programming (ASP) (Brew ka et al. 2011), a well-known approach to knowledge representation and reasoning with root s in the areas of logic programming and nonmonotonic reasoning (Gelfond and Lifschitz 1991), through the development of the ASP-Core language (Calimeri et al. 2011). The first ASP-Core version was a rule-based language whose syntax stems from plain Datalog and Prolog, and was a conservative extension t o the non-ground case of the Core language adopted in the First ASP Competition held in 2002 during the D agstuhl Seminar "Nonmonotonic Reasoning, Answer Set Programming and Constraints"